// 用于主页面通用内容
import Main from '@/views/main.vue';
// 用于二级页面的内容
import SubMain from '@/views/sub-main.vue';

export default {
	path: '/setup',
	name: 'setup',
	redirect: '/setup/overall/basic',
	meta: {
		title: '设置',
		icon: 'ios-settings'
	},
    component: Main,
    children: [
		{
			path: 'overall',
			name: 'steup_overall',
			meta: {
				title: '全局'
			},
			component: SubMain,
			children: [
				{
					path: 'basic',
					name: 'steup_overall_basic',
					meta: {
						title: '基础设置',
						cache: true
					},
					component: resolve => {
						require(['@/views/setup/overall/basic/index.vue'], resolve)
					}
				},
				{
	        		path: 'pay',
		        	name: 'steup_overall_pay',
		        	meta: {
		        		title: '支付设置'
		        	},
		        	component: resolve => {
			        	require(['@/views/setup/overall/pay/index.vue'], resolve)
			        }
		       	},
		       	{
		    		path: 'wechatPay',
		        	name: 'steup_overall_pay_wechat',
		        	meta: {
		        		title: '微信支付配置',
		        		active: 'steup_overall_pay'
		        	},
		        	component: resolve => {
			        	require(['@/views/setup/overall/pay/wechat.vue'], resolve)
			        }
		    	},
		    	{
		    		path: 'alipay',
		        	name: 'steup_overall_pay_alipay',
		        	meta: {
		        		title: '支付宝配置',
		        		active: 'steup_overall_pay'
		        	},
		        	component: resolve => {
			        	require(['@/views/setup/overall/pay/alipay.vue'], resolve)
			        }
		    	},
		    	{
		    		path: 'jdPay',
		        	name: 'steup_overall_pay_jdPay',
		        	meta: {
		        		title: '京东支付配置',
		        		active: 'steup_overall_pay'
		        	},
		        	component: resolve => {
			        	require(['@/views/setup/overall/pay/jd.vue'], resolve)
			        }
		    	},
		       	{
	        		path: 'staff',
		        	name: 'steup_overall_staff',
		        	meta: {
		        		title: '员工管理'
		        	},
		        	component: resolve => {
			        	require(['@/views/setup/overall/staff/index.vue'], resolve)
			        }
	        	},
	        	{
		    		path: 'staffEdit',
		        	name: 'steup_overall_staff_edit',
		        	meta: {
		        		title: '编辑员工账号',
		        		active: 'steup_overall_staff'
		        	},
		        	component: resolve => {
			        	require(['@/views/setup/overall/staff/staff-edit.vue'], resolve)
			        }
		    	},
		    	{
		    		path: 'staffRole',
		        	name: 'steup_overall_staff_role',
		        	meta: {
		        		title: '编辑身份角色',
		        		active: 'steup_overall_staff'
		        	},
		        	component: resolve => {
			        	require(['@/views/setup/overall/staff/role-edit.vue'], resolve)
			        }
		    	},
	        	{
	        		path: 'sms',
		        	name: 'steup_overall_sms',
		        	meta: {
		        		title: '短信通知'
		        	},
		        	component: resolve => {
			        	require(['@/views/setup/overall/sms/index.vue'], resolve)
			        }
	        	},
	        	/*{
	        		path: 'log',
		        	name: 'steup_overall_log',
		        	meta: {
		        		title: '操作日志'
		        	},
		        	component: resolve => {
			        	require(['@/views/setup/overall/log/index.vue'], resolve)
			        }
	        	}*/
			]
		},
		{
			path: 'delivery',
			name: 'steup_delivery',
			meta: {
				title: '配送'
			},
			component: SubMain,
			children: [
				{
					path: 'freight',
		        	name: 'steup_delivery_freight',
		        	meta: {
		        		title: '运费模板'
		        	},
		        	component: resolve => {
			        	require(['@/views/setup/delivery/freight/index.vue'], resolve)
			        }
				},
				{
		    		path: 'freightConfig',
		        	name: 'setup_delivery_freight_config',
		        	meta: {
		        		title: '运费模板配置',
		        		active: 'steup_delivery_freight'
		        	},
		        	component: resolve => {
			        	require(['@/views/setup/delivery/freight/config.vue'], resolve)
			        }
		    	},
		    	{
					path: 'local',
		        	name: 'steup_delivery_local',
		        	meta: {
		        		title: '同城配送',
		        		disabled: true
		        	},
		        	component: resolve => {
			        	require(['@/views/setup/delivery/local/index.vue'], resolve)
			        }
				},
				{
					path: 'store',
		        	name: 'steup_delivery_store_index',
		        	meta: {
		        		title: '门店设置'
		        	},
		        	component: resolve => {
			        	require(['@/views/setup/delivery/store/index.vue'], resolve)
			        }
				},
				{
					path: 'storeEdit',
		        	name: 'steup_delivery_store_edit',
		        	meta: {
		        		title: '门店编辑',
		        		active: 'steup_delivery_store_index'
		        	},
		        	component: resolve => {
			        	require(['@/views/setup/delivery/store/edit.vue'], resolve)
			        }
				},
				{
					path: 'storeSet',
		        	name: 'steup_delivery_store_set',
		        	meta: {
		        		title: '自提设置'
		        	},
		        	component: resolve => {
			        	require(['@/views/setup/delivery/store/set.vue'], resolve)
			        }
				}
			]
		},
		{
			path: 'wechat',
			name: 'steup_wechat',
			meta: {
				title: '微信'
			},
			component: SubMain,
			children: [
				{
					path: 'login',
		        	name: 'setup_wechat_login',
		        	meta: {
		        		title: '公众号登录',
		        		disabled: true
		        	},
		        	component: resolve => {
			        	require(['@/views/setup/wechat/login/index.vue'], resolve)
			        }
				},
				{
					path: 'menu',
		        	name: 'setup_wechat_menu',
		        	meta: {
		        		title: '自定义菜单',
		        		disabled: true
		        	},
		        	component: resolve => {
			        	require(['@/views/setup/wechat/menu/index.vue'], resolve)
			        }
				}
			]
		}
    ]
}